﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Modules.guide.actions {
    import L10n.*;

    public class GANotify extends GuideAction {

        protected var m_notify:String;

        override public function createFromXml(_arg1:XML):Boolean{
            var _local4:String;
            var _local5:String;
            var _local6:Array;
            var _local7:uint;
            var _local8:Array;
            var _local2:XMLList = checkAndGetElement(_arg1, "notify");
            if (!_local2){
                return (false);
            };
            var _local3:String = _local2.@name;
            if (_local3.length > 0){
                this.m_notify = _local3;
            } else {
                return (false);
            };
            if (LocaleHelper.localSetting.sns.experiment_FTUE_enable){
                _local4 = _local2.@expname;
                _local5 = _local2.@expvars;
                if ((((_local4.length > 0)) && ((_local5.length > 0)))){
                    _local6 = _local5.split(",");
                    _local7 = 0;
                    while (_local7 < _local6.length) {
                        _local8 = (_local6[_local7] as String).split(":");
                        if (Global.experimentManager.getVariant(_local4) == _local8[0]){
                            this.m_notify = _local8[1];
                            return (true);
                        };
                        _local7++;
                    };
                };
            };
            return (true);
        }
        override public function update(_arg1:Number):void{
            super.update(_arg1);
            m_guide.notify(this.m_notify);
            removeState(this);
        }
        public function set notify(_arg1:String):void{
            this.m_notify = _arg1;
        }

    }
}//package Modules.guide.actions 
